import request from "@/utils/request";

export async function putImgRegister(formData) {
  return request({
    url: '/aiface/faceRegister',
    method: 'post',
    data: formData,
    headers: {
      'Content-Type':'multipart/form-data'
    }
  });
}

export async function putImgLogin(formData) {
  return request({
    url: '/aiface/faceLogin',
    method: 'post',
    data: formData,
    headers: {
      'Content-Type':'multipart/form-data'
    }
  });
}

export async function sendAlarmEmail() {
  return request({
    url: '/sendEmail/sendAlarmEmail',
    method: 'get',
  });
}

export async function generateWord(userNum, visitorNum, saleGoodsNum, complaintNum, payment, medical, maintenance, chargeRecord) {
  return request({
    url: '/reports/generateWord',
    method: 'get',
    responseType: 'blob',
    params: {
      'ownerNum': userNum.ownerNum, 'dwellerNum': userNum.dwellerNum, 'visitorNum': visitorNum, 'saleGoodsNum': saleGoodsNum, 'complaintNum': complaintNum, 'hasPayment': payment.hasPayment, 'notPayment': payment.notPayment
    }
  });
}
